﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Sanpham_damua.ascx.cs" Inherits="eDream.Page.Sanpham_damua" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<div style="margin-top: 20px">
    <div class="cloum_text">
        Từ ngày
    </div>
    <div class="cloum_1">
        <dx:ASPxDateEdit ID="dteFrom" runat="server" Theme="DevEx" Height="29px"></dx:ASPxDateEdit>
    </div>
    <div class="cloum_text">
        Đến ngày
    </div>
    <div class="cloum_1">
        <dx:ASPxDateEdit ID="dteTo" runat="server" Theme="DevEx" Height="29px"></dx:ASPxDateEdit>
    </div>
    <div class="cloum_text">
        Trạng thái
    </div>
    <div class="cloum_1">
        <dx:ASPxComboBox ID="cbxTrangthai" runat="server" Height="29px" Theme="DevEx">
            <Items>
                <dx:ListEditItem Text="Mới đặt" Value="1" Selected="true"/>
                <dx:ListEditItem Text="Đang chuyển" Value="2" />
                <dx:ListEditItem Text="Đã chuyển" Value="3" />
                <dx:ListEditItem Text="Đã hủy" Value="4" />
            </Items>
        </dx:ASPxComboBox>
    </div>
    <div class="cloum_1">
        <dx:ASPxButton ID="btnTim" runat="server" Text="Tìm" Theme="iOS" AutoPostBack="false" OnClick="btnTim_Click">  
        </dx:ASPxButton>
    </div>
    <div class="Clear"></div>
    <br />
    <dx:ASPxGridView ID="grvDonhang" runat="server" Theme="DevEx"  AutoGenerateColumns="False"  EnableTheming="True" KeyFieldName="IDd" OnLoad="grvDonhang_Load">
                    <Columns>
                             <dx:GridViewDataTextColumn Caption="STT" Name="colRowID" VisibleIndex="0"
                                Width="20px">
                                <DataItemTemplate>
                                    <dx:ASPxLabel ID="lblRowID" runat="server" Text='<%# Container.ItemIndex + 1 %>'>
                                    </dx:ASPxLabel>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Mã ĐH" FieldName="Ma_DH" VisibleIndex="1" Width="80px">
                            <CellStyle Wrap="True" Font-Bold="true"></CellStyle>
                        </dx:GridViewDataTextColumn>
                         <dx:GridViewDataImageColumn Caption="Hình" FieldName="image" VisibleIndex="2" Width="100px">
                            <DataItemTemplate>
                                <img src='<%# String.Format("http://msmart.vn/Image/product/{0}", Eval("image")) %>' alt='<%#Eval("iProName") %>' width="100" height="100" />
                            </DataItemTemplate>
                        </dx:GridViewDataImageColumn>
                        <dx:GridViewDataTextColumn Caption="Sản phẩm" FieldName="iProName" VisibleIndex="3" Width="170px">
                            <DataItemTemplate>
                                <a href='<%# String.Format("http://msmart.vn/San-pham/{0}/{1}.html", Eval("ProductID"), Utility1.WebUtils.convertToUnSign3(Eval("iProName").ToString())) %>' style="font-weight:bold" ><%#Eval("iProName") %></a>
                            </DataItemTemplate>
                            <CellStyle Wrap="True"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Số lượng" FieldName="Soluong" VisibleIndex="4" Width="80px">
                            <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Đơn giá" FieldName="dongia" VisibleIndex="5" Width="100px">
                            <DataItemTemplate>
                                <%# Utility1.Utils.GetMoneyString(double.Parse(Eval("Gia").ToString())) %> vnđ
                            </DataItemTemplate>
                            <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Name="Thanhtien" Caption="Thành tiền" FieldName="thanhtien" VisibleIndex="6" Width="120px">
                             <DataItemTemplate>
                                <%# Utility1.Utils.GetMoneyString(double.Parse(Eval("tongtien").ToString())) %> vnđ
                            </DataItemTemplate>
                            <CellStyle HorizontalAlign="Center" Wrap="True"></CellStyle>
                            <FooterTemplate>
                                <dx:ASPxLabel ID="lbTong" runat="server" Font-Bold="true" ForeColor="Red" Text=""></dx:ASPxLabel>
                            </FooterTemplate>
                        </dx:GridViewDataTextColumn>
                         <dx:GridViewDataDateColumn Caption="Ngày đặt" FieldName="datePost" VisibleIndex="7" Width="100px">
                             <CellStyle HorizontalAlign="Center"></CellStyle>
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn Caption="Trạng thái" FieldName="trangthai" VisibleIndex="8" Width="100px">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                </dx:ASPxGridView>
</div>

